package cn.bdqn.mh.response;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 此枚举表示统一响应给客户端的消息编码和提示
 * 创建人:  zhang
 * 创建日期: 2020/6/26 11:43
 */

public enum ResultCode {
    SUCCESS(0,"ok"),//成功消息
    NO_DATAFOUND(-10000,"没有查到任何值"),
    BUSINESS_ERROR(-10010,"执行业务发生错误"),
    ACCESS_DENIND(-100020,"访问被拒绝，没有权限"),
    OTHER_ERROR(500,"代码执行错误");
    private int code;
    private String message;

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    ResultCode(int code, String message){
        this.code=code;
        this.message=message;
    }
}
